<template>
	<Modal :value="value" :title="title" @on-visible-change="visibleChange">
		<template v-for="item in tags">
			<Button type="dashed" :key="item.id" :style="{ margin: '4px' }">
				<b :style="{ color: 'red' }">{{ item.tagName }}</b>
			</Button>
		</template>
		<template v-if="!tags.length">
			<p class="tc">
				<b>暂未添加标签</b>
			</p>
		</template>
		<template slot="footer">
			<div class="tc">
				<Button type="primary" @click="visibleChange(false)">确认</Button>
			</div>
		</template>
	</Modal>
</template>
<script>
export default {
	name: 'subjectTagsModal',
	model: {
		prop: 'value',
		event: 'visibleChange'
	},
	props: {
		title: {
			type: String,
			default: ''
		},
		value: Boolean,
		tags: {
			type: Array,
			default: []
		}
	},
	methods: {
		visibleChange(visible) {
			this.$emit('visibleChange', visible)
		}
	}
}
</script>
<style lang="less" scoped>
</style>
